﻿using System.Text;

namespace LeRenard.Core.Cryptography
{
    /// <summary>
    /// Base64 cryptography base.
    /// </summary>
    public abstract class CryptographyBase
    {
        /// <summary>
        /// Holds the encoding.
        /// </summary>
        public Encoding Encoding { get { return _encoding; } }
        private readonly Encoding _encoding;

        /// <summary>
        /// Creates a new <see cref="Base64Encryptor"/>.
        /// </summary>
        /// <param name="encoding">The encoding to be used.</param>
        public CryptographyBase(Encoding encoding)
        {
            ThrowIf.Null(() => encoding);

            _encoding = encoding;
        }
    }
}
